# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/ebuildteam/net-misc/pcmanx-svn/pcmanx-svn-0.2.6.ebuild,v 1.1 2005/08/01 06:11:55 scsi Exp $

inherit subversion perl-module flag-o-matic

ESVN_REPO_URI="https://svn.csie.net/pcmanx/pcmanx_pure_gtk2"
ESVN_PROJECT="pcmanx_pure_gtk2"
ESVN_BOOTSTRAP="NOCONFIGURE=1 ./autogen.sh"

DESCRIPTION="PCMan is an easy-to-use telnet client mainly targets BBS users formerly writen by gtk2"
HOMEPAGE="http://pcmanx.csie.net/"
LICENSE="GPL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="mozilla firefox"

RDEPEND=">=x11-libs/gtk+-2.4
		mozilla? (www-client/mozilla)
		firefox? (www-client/mozilla-firefox)
        virtual/x11
        !virtual/pcmanx"
PROVIDE="virtual/pcmanx"

DEPEND="${RDEPEND}
	sys-devel/libtool
	=sys-devel/automake-1.9*
	dev-util/intltool
	"

src_compile() {
	# Irssi uses extern inlines and that needs at least -O
	is-flag "-O*" || append-flags -O

	export WANT_AUTOCONF=1.9
	
	myconf="--enable-script"
	use mozilla ||use firefox && myconf="$myconf --enable-plugin"

	econf $myconf || die "econf failed"
	
	emake || die "emake failed"
}

src_install() {

	make DESTDIR="${D}" install || die "make install failed"
}
